<template>
    <div class="title_box">
        <span></span>
        <div>
            <span>{{ text }}</span>
            <span></span>
        </div>
    </div>
</template>

<script setup lang="ts">
interface Props {
    /** 类目文案 */

    text: string;
}
const props = withDefaults(defineProps<Props>(), {
    text: ''
});
</script>

<style lang="scss" scoped>
.title_box {
    display: flex;
    align-items: center;

    > span {
        width: 25px;
        height: 25px;
        display: block;
        background: url('@/assets/image/titleboxicon.png') no-repeat;
        background-size: 100%;
        transform: rotate(45deg);
    }

    > div {
        width: calc(100% - 25px);
        padding-left: 5px;

        span {
            font-size: 14px;
            font-weight: 500;
            color: #ffffff;
            letter-spacing: 2px;

            &:nth-of-type(2) {
                display: block;
                width: 100%;
                height: 2px;
                background: url('@/assets/image/titleboderback.png') no-repeat;
                background-size: 100% 100%;
                margin-top: 10px;
            }
        }
    }
}
</style>
